/* 学习页面样式 */
.study-container {
    max-width: 800px; /* 确保容器宽度 */
    margin: 20px auto 20px; /* 上下边距 */
    padding: 0 20px;
}

.study-header {
    text-align: center;
    margin-bottom: 40px;
}

.study-header h1 {
    font-size: 32px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.subtitle {
    color: #666;
    font-size: 16px;
}

.study-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.study-item h3 {
    margin: 0 0 10px;
    font-size: 24px;
    color: #333;
}

.study-item p {
    margin: 0;
    color: #666;
}

.tags {
    margin-top: 10px;
}

.tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #333; /* 浅灰色文字 */
    background: #e0e0e0; /* 浅灰色背景 */
    margin-right: 5px;
}

.search-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.sort-select {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.date {
    font-size: 14px;
    color: #999;
    margin-top: 10px;
}

.detail-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.detail-btn:hover {
    background-color: #5a9bd4;
}

.edit-btn,
.delete-btn {
    background-color: #007bff; /* 蓝色背景 */
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    margin-top: 10px;
    margin-right: 5px; /* 添加右边距 */
    transition: background-color 0.3s;
}

.edit-btn:hover,
.delete-btn:hover {
    background-color: darken(#007bff, 10%);
}

.tag-filter {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    color: white; /* 文字颜色 */
    background: #ff7f50; /* 暖色调背景 */
    margin-right: 5px;
    cursor: pointer;
    transition: background 0.3s; /* 只添加背景颜色过渡 */
}

.tag:hover {
    background: #ff6347; /* 悬停时变深 */
}

.clear-filter-btn {
    background-color: #ff4d4d; /* 红色背景 */
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.clear-filter-btn:hover {
    background-color: #ff1a1a; /* 悬停时变深 */
}

/* 弹出框样式 */
.modal {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* 卡片内标签样式 */
.tags .tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #333; /* 浅灰色文字 */
    background: #e0e0e0; /* 浅灰色背景 */
    margin-right: 5px;
}

/* 标签过滤部分的标签样式 */
.tag-filter .tag {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    color: white; /* 文字颜色 */
    background: #ff7f50; /* 暖色调背景 */
    margin-right: 5px;
    cursor: pointer;
    transition: background 0.3s; /* 只添加背景颜色过渡 */
}

.tag-filter .tag:hover {
    background: #ff6347; /* 悬停时变深 */
}

.clear-filter-btn {
    background-color: #ff4d4d; /* 红色背景 */
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.clear-filter-btn:hover {
    background-color: #ff1a1a; /* 悬停时变深 */
}

.header-image {
    margin: 5px 0; /* 调整图片上下边距，减少空隙 */
    overflow: hidden; /* 隐藏超出部分 */
    border-radius: 10px; /* 圆角边框 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* 添加阴影 */
}

.header-image img {
    width: 100%; /* 使图片宽度适应容器 */
    height: auto; /* 保持图片比例 */
    max-height: 300px; /* 设置最大高度 */
    object-fit: cover; /* 保持图片比例并裁剪 */
}

.add-study-item {
    margin-bottom: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.new-title-input,
.new-description-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.new-description-input {
    height: 100px; /* 设置描述框高度 */
}

.add-study-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-study-btn:hover {
    background-color: #5a9bd4;
}

.select-study-topic {
    margin-bottom: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.topic-select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.view-topic-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.view-topic-btn:hover {
    background-color: #5a9bd4;
} 